<template>
  <div class='sub-back-wrapper'>
    <div class='back-btn' @click="goBack()"></div>
    <div class="title">
      {{title}}
    </div>
  </div>
</template>

<script>
export default {
  name: 'subBackHeader',
  props: {
    title: String,
    isShowBack: {
      type: Boolean,
      default: true
    },
    /**
     * @param mode
     * default 代表默认样式，长用于含有三级及以上左侧菜单的页面;样式特点：竖直方向居中、有下划线
     * special 代表特殊样式，常用于页面没有左侧菜单的内页；样式特点：竖直方向不局中、无下划线
     */
    mode: {
      type: String,
      default: 'default'
    }
  },
  data () {
    return {

    }
  },
  methods: {
    goBack () {
      history.go(-1)
    }
  }
}
</script>

<style lang="stylus" scoped>
.title
  font-size 16px
  font-weight 600
.sub-back-wrapper
  height 48px
  display flex
  align-items center
  background #fff
  padded_box(border-box, 0 15px)
  border-bottom 1px solid #EAEDF7
  .back-btn
    width 40px
    height 40px
    background url('../assets/img/icon_back2@2x.png') no-repeat center/ 18px
</style>
